<template>
  <div class="about-container">
    <div class="about-header">
      <h1 class="about-title">关于本框架</h1>
      <div class="version-badge">
        <el-tag type="info">版本 1.0.0</el-tag>
      </div>
    </div>
    
    <el-card class="about-card">
      <div class="about-content">
        <p>这是一个基于 Electron + Vue3 + Vite + JavaScript 构建的现代桌面应用框架，旨在提供美观大气且易用的开发体验。</p>
        
        <h2>主要特性</h2>
        <el-descriptions :column="1" border>
          <el-descriptions-item label="技术栈">Electron + Vue3 + Vite + JavaScript</el-descriptions-item>
          <el-descriptions-item label="UI组件">Element Plus</el-descriptions-item>
          <el-descriptions-item label="状态管理">Pinia</el-descriptions-item>
          <el-descriptions-item label="路由">Vue Router</el-descriptions-item>
          <el-descriptions-item label="样式">SCSS</el-descriptions-item>
          <el-descriptions-item label="打包工具">Electron Builder</el-descriptions-item>
        </el-descriptions>
        
        <h2>框架优势</h2>
        <div class="advantages">
          <el-timeline>
            <el-timeline-item
              v-for="(advantage, index) in advantages"
              :key="index"
              :type="advantage.type"
              :color="advantage.color"
              :timestamp="advantage.title"
            >
              {{ advantage.content }}
            </el-timeline-item>
          </el-timeline>
        </div>
        
        <h2>开发团队</h2>
        <div class="team-section">
          <el-avatar :size="64" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"></el-avatar>
          <div class="team-info">
            <h3>是个人</h3>
            <p>专注于构建高质量、美观易用的应用框架</p>
          </div>
        </div>
      </div>
    </el-card>
    
    <div class="action-section">
      <el-button type="primary" @click="goToGithub">
        <el-icon><Link /></el-icon>
        访问 Gitee
      </el-button>
      <el-button @click="reportIssue">
        <el-icon><Warning /></el-icon>
        报告问题
      </el-button>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import { Link, Warning } from '@element-plus/icons-vue';

const advantages = ref([
  {
    title: '高效开发',
    content: '基于Vite的快速热重载，提供极速的开发体验',
    type: 'primary',
    color: '#409EFF'
  },
  {
    title: '美观界面',
    content: '精心设计的UI组件和动画效果，提供出色的视觉体验',
    type: 'success',
    color: '#67C23A'
  },
  {
    title: '跨平台兼容',
    content: '支持Windows、macOS和Linux多平台部署',
    type: 'warning',
    color: '#E6A23C'
  },
  {
    title: '易于扩展',
    content: '模块化设计，便于功能扩展和二次开发',
    type: 'info',
    color: '#909399'
  }
]);

const goToGithub = () => {
  // 在实际应用中，这里可以使用Electron的shell.openExternal打开浏览器
  shell.openExternal("https://gitee.com/rengeshi")
  console.log('打开GitHub页面');
};

const reportIssue = () => {
  // 在实际应用中，这里可以打开issue提交页面
  console.log('打开问题报告页面');
};
</script>

<style lang="scss" scoped>
.about-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.about-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(135deg, #3a8ee6, #5ca9f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-card {
  margin-bottom: 30px;
}

.about-content {
  line-height: 1.6;
  
  h2 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-text-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
  }
  
  p {
    margin-bottom: 15px;
    color: var(--regular-text-color);
  }
}

.advantages {
  margin: 20px 0;
}

.team-section {
  display: flex;
  align-items: center;
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.team-info {
  margin-left: 15px;
  
  h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
  }
  
  p {
    margin: 0;
    color: var(--regular-text-color);
  }
}

.action-section {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .about-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .version-badge {
    margin-top: 10px;
  }
  
  .team-section {
    flex-direction: column;
    text-align: center;
  }
  
  .team-info {
    margin-left: 0;
    margin-top: 10px;
  }
}
</style>
